<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>10_案例练习-返回n到m之间所有数字的和</title>
    </head>
    <body>
        <script>
            function f1(n,m){
                var sum = 0;
                for(var i = n; i <= m; i++){
                    sum += i;
                }
                return sum;
            }

            var a = f1(1,100);
            console.log(a);
        </script>
    </body>
</html>